Skip to content

🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge)#2486

Merged
openshift-merge-bot[bot] merged 10 commits intooperator-framework:mainfrom
camilamacedo86:deps-up
Feb 12, 2026
Merged

🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge)#2486
openshift-merge-bot[bot] merged 10 commits intooperator-framework:mainfrom
camilamacedo86:deps-up

Conversation

@camilamacedo86
Copy link
Contributor

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Copilot AI review requested due to automatic review settings February 5, 2026 13:15
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 5, 2026
@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit efbe1f6
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/698b804fb743d10008cb22b5
😎 Deploy Preview https://deploy-preview-2486--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.44%. Comparing base (28102fa) to head (efbe1f6).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
test/utils.go 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2486      +/-   ##
==========================================
- Coverage   73.74%   69.44%   -4.30%     
==========================================
  Files         102      102              
  Lines        8496     8504       +8     
==========================================
- Hits         6265     5906     -359     
- Misses       1747     2129     +382     
+ Partials      484      469      -15     
Flag Coverage Δ
e2e 45.59% <100.00%> (-0.65%) ⬇️
experimental-e2e 12.72% <100.00%> (-41.32%) ⬇️
unit 57.89% <27.77%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings February 5, 2026 15:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 5, 2026 15:59
@camilamacedo86 camilamacedo86 changed the title WIP: 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) Feb 5, 2026
@camilamacedo86 camilamacedo86 changed the title 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) WIP 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Track in a future issue: "Generate apply configurations and migrate to typed Apply methods"
//
// nolint:staticcheck // SA1019: server-side apply required, needs generated apply configurations
return bc.Client.Patch(ctx, rev, client.Apply, client.FieldOwner(bc.FieldOwner), client.ForceOwnership)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Lets looking on that in a follow up shows very complex to go in this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall running into the --with-applyconfig somewhere else...

@camilamacedo86 camilamacedo86 changed the title WIP 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) Feb 6, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2026
test/utils.go Outdated
if lastErr != nil {
log.Printf("StopWithRetry: timeout reached before successful teardown; last error: %v", lastErr)
}
return env.Stop() // Final attempt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it likely that the final attempt works? could we be calling out a false negative with the previous log line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should just return:

fmt.Errorf("StopWithRetry: timeout reached before successful teardown; last error: %v", lastErr)

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works as it is. Within controller-runtime v0.23. has some timing changes in the test environment teardown process. Without using Eventually, testEnv.Stop() can fail intermittently with errors related to graceful shutdown timing.

So this code does the same of:

var _ = AfterSuite(func() {
    By("tearing down the test environment")
    cancel()
    Eventually(func() error {
        return testEnv.Stop()
    }, time.Minute, time.Second).Should(Succeed())
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My question is whether we can be in a situation where

StopWithRetry: timeout reached before successful teardown; last error: ... is printed out but actually it stopped successfully in the final attempt (and whether we care)

Copy link
Contributor

@perdasilva perdasilva Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just do

err := env.Stop() // Final attempt
if err != nil {
   log ...
}
return err

then you also don't need to keep the lastErr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@pedjak pedjak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 10, 2026
…0.23.0

controller-runtime v0.23.0 introduced type-safe webhook builders using generics.
Webhook methods now receive typed objects directly instead of runtime.Object,
eliminating the need for type assertions and providing compile-time type safety.

Changes:
- Update ClusterCatalog webhook Default method to use *ocv1.ClusterCatalog
- Update SetupWebhookWithManager to pass type to NewWebhookManagedBy
- Simplify tests to leverage type safety (no type assertion tests needed)


Assisted-by: Cursor/Claude
controller-runtime v0.23.0 changed test environment teardown timing behavior.
Direct calls to testEnv.Stop() can fail intermittently due to graceful shutdown timing,
requiring retry logic to ensure proper cleanup.

Changes:
- Add StopWithRetry helper function to test/utils.go with retry logic
- Wrap testEnv.Stop() calls with retry helper (1-minute timeout, 1-second interval)
- Add error logging for each retry attempt to aid debugging
- Update api/v1/suite_test.go to use test.StopWithRetry
- Update internal/operator-controller/controllers/suite_test.go to use test.StopWithRetry

This shared utility follows DRY principle and ensures consistent teardown behavior
across all test suites, preventing flaky test failures during teardown.

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	api/v1/suite_test.go
#	internal/operator-controller/controllers/suite_test.go
…v0.23.0

controller-runtime v0.23.0 added Apply method to the StatusWriter interface
for server-side apply support on status subresources.

Changes:
- Add Apply method to statusWriterMock to satisfy StatusWriter interface
- Method signature: Apply(context.Context, runtime.ApplyConfiguration, ...SubResourceApplyOption)


Assisted-by: Cursor/Claude
The client.Apply patch type constant is deprecated in controller-runtime v0.23.0+
in favor of typed Apply methods that require generated apply configurations.

However, server-side apply with field ownership management is essential for this
controller to properly manage ClusterExtensionRevision lifecycle. The deprecated
client.Apply provides:
- Field ownership via client.FieldOwner()
- Force ownership via client.ForceOwnership
- Automatic create-or-update semantics

Alternative approaches (MergeFrom, StrategicMerge) lack field management support,
causing upgrade test failures where ownership conflicts prevent proper updates during
controller upgrades.

Changes:
- Keep client.Apply usage with comprehensive nolint explanation
- Document why server-side apply semantics are required
- Note migration path: generate apply configurations project-wide

This ensures controllers work correctly during upgrades while documenting the
technical debt for future migration.

Assisted-by: Cursor/Claude
The fake.NewSimpleClientset is deprecated in client-go in favor of
fake.NewClientset which provides better support for field management
and server-side apply testing.

The migration is straightforward for tests that don't require apply
configurations - simply replace NewSimpleClientset() with NewClientset().
The new implementation works seamlessly with existing reactor-based mocking.

Changes:
- Replace fake.NewSimpleClientset() with fake.NewClientset()
- Remove nolint suppression comment
- All tests pass without modifications

Assisted-by: Cursor/Claude
Address code review feedback by making the Apply method implementation
more defensive:

- Add applyCalled tracking field to statusWriterMock
- Return error if Apply is unexpectedly called during tests
- This ensures tests fail immediately if the code starts using Apply,
  rather than silently passing with incorrect assumptions

The error message clearly indicates this method is not expected to be
used, making debugging easier if the interface usage changes in the future.

Assisted-by: Cursor/Claude
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 10, 2026
camilamacedo86 and others added 2 commits February 10, 2026 09:18
Controller-runtime v0.23.1+ has faster leader election startup, causing timing
issues with the upgrade e2e tests that watch pod logs for leader election messages.

The log watching approach fails because it uses Follow=true which only streams NEW
logs, missing messages emitted before the test starts watching. With faster startup
in v0.23.1+, leader election often completes before the test begins watching.

Changes:
- Replace log watching with direct lease object checking for leader election
- Poll lease.Spec.HolderIdentity to confirm leader election occurred
- Refactor watchPodLogsForSubstring to use polling with TailLines instead of Follow
- Add per-poll context timeout (5s) to prevent hanging on slow log streams
- Add scanner error checking to detect and handle stream errors
- Fix context cancellation timing - pollCancel() called after stream operations complete
- Add k8s.io/utils/ptr import for log options

This approach is timing-independent and directly verifies the desired state
rather than relying on log message observation. The per-poll timeout prevents
tests from hanging indefinitely while still respecting the outer context timeout.

Fixes address Copilot review comments about context management and error handling.

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>
…ernetes v1.35

Kubernetes v1.35 changed CEL validation error message format to include
the actual validated value instead of just the type ("string" or "object").
This provides more helpful error messages for debugging validation failures.

This commit was accidentally dropped during interactive rebase.

Changes:
- Update test expectations to include actual values in error messages
- Change from 'Invalid value: "string"' to 'Invalid value: "actual-value"'
- Update 20+ test cases in TestImageSourceCELValidationRules and related tests
- Fix indentation consistency across all test cases

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Address code review feedback from @perdasilva: the "final attempt" after
timeout creates a confusing false negative. If the final attempt succeeds
after we've logged "timeout reached", we return success despite logging
a timeout message.

Changes:
- Remove final attempt after timeout
- Return error immediately when timeout is reached
- Clearer error message with timeout duration
- Prevents false negatives where timeout is logged but success is returned

This makes the function behavior match its log messages - if we say we
timed out, we actually return an error.

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>
@perdasilva
Copy link
Contributor

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2026
@tmshort
Copy link
Contributor

tmshort commented Feb 12, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2026
Copy link
Member

@rashmigottipati rashmigottipati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Feb 12, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: perdasilva, rashmigottipati, tmshort

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@camilamacedo86
Copy link
Contributor Author

/override codecov/project

@openshift-ci
Copy link

openshift-ci bot commented Feb 12, 2026

@camilamacedo86: Overrode contexts on behalf of camilamacedo86: codecov/project

Details

In response to this:

/override codecov/project

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 04899a2 into operator-framework:main Feb 12, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants